feat(events): add event posting - #654
Merged
Merged
Conversation
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Add an events post command with the same inputs and behavior as dogshell. - Map all dogshell post options to the Datadog V1 event API - Support stdin messages, local-host defaults, and no-host overrides - Add positive and negative tests for payloads, parsing, and errors Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
platinummonkey
approved these changes
Jul 18, 2026
2 tasks
rachelyangdog
pushed a commit
to rachelyangdog/pup
that referenced
this pull request
Jul 20, 2026
openapi-transformer's pup generator copies client.rs/util.rs byte-for-byte from a bundled snapshot on every regeneration, but only make_api!/ make_api_no_auth! and util::read_json_file are actually generator-relevant. Everything else was pup's own hand-written command logic that just happened to live in those files, so a routine feature PR (DataDog#654, event posting) got silently reverted the next time the client was regenerated (pup#651). Split both files along the generator/hand-written boundary, mirroring how main.rs/generated.rs already separate hand-written and generated code: - client.rs keeps only what make_api!/make_api_no_auth! need: BearerAuthMiddleware/UserAgentMiddleware, make_dd_config/make_dd_client, the two macros, UNSTABLE_OPS. - New raw_client.rs holds the rest: HttpError/HttpResponse, AuthType/ get_auth_type, the OAuth-exclusion table + apply_auth, parse_response_json, and every raw_* HTTP helper used by ~16 hand-written commands for endpoints not covered by the typed SDK. - util.rs keeps only read_json_file. New util_ext.rs holds time/duration parsing, the monitor-diff helpers, parse_compute_raw, and percent_encode. Pure move: identical function bodies/signatures, only import paths changed.
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds
pup events postwith feature parity for the dogshell event post command. The new command maps all supported post fields to the Datadog V1 Events API, supports messages from either an argument or stdin, defaults to the local hostname, and allows--no_hostto suppress host association.Motivation
Pup could list, search, and retrieve events but could not create them. This change enables existing dogshell users to migrate event-posting workflows to pup without losing supported fields or behavior.
Additional Notes
--no_host,--aggregation_key, and--alert_typeare accepted alongside clap's hyphenated forms.--no_hostoverrides.cargo clippy --tests -- -D warningsandcargo fmt --checkpass.Checklist
Related Issues
N/A
Generated with GitHub Copilot